package model.houseproject_commity.controller;


import model.houseproject_commity.entity.Appointment;
import model.houseproject_commity.entity.Result;
import model.houseproject_commity.service.AppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by ws on 2019/7/3.
 */
@RestController
public class appointmentController {
    @Autowired
    private AppointmentService appointmentService;
    @CrossOrigin
     @GetMapping("/appointment")
     public Result find(){
         List<Appointment> orderList = appointmentService.findallorder();
         Result result=new Result(true,20000,"查询成功",orderList);
         return result;
     }
}
